#ifndef IRQ_H
#define IRQ_H

//------------------------------------------------------------------------------
//         Headers
//------------------------------------------------------------------------------
//#include "CM3/core_cm3.h"

//------------------------------------------------------------------------------
//         Definitions
//------------------------------------------------------------------------------
#if 0
#if defined(cortexm3)
#ifdef __NVIC_PRIO_BITS
#undef __NVIC_PRIO_BITS
#define __NVIC_PRIO_BITS           ((SCB->AIRCR & 0x700) >> 8) 
#endif
#endif
#endif

//------------------------------------------------------------------------------
//         Global functions
//------------------------------------------------------------------------------

#ifdef __cplusplus
extern "C"
{
#endif

void IRQ_ConfigureIT(unsigned int source,
                            unsigned int mode);//,         // mode for AIC, priority for NVIC
                            //void( *handler )( void )); // ISR

void IRQ_EnableIT(unsigned int source);

void IRQ_DisableIT(unsigned int source);

#ifdef __cplusplus
}
#endif

#endif //#ifndef IRQ_H

